import React, {Component} from "react";
import { Cascader } from 'antd';

class CascaderA extends React.Component{
    
    render() {
        function onChange(value) {
            console.log(value);
          }
          const options = [
            {
              value: 'zhejiang',
              label: 'Zhejiang',
              children: [
                {
                  value: 'hangzhou',
                  label: 'Hangzhou',
                  children: [
                    {
                      value: 'xihu',
                      label: 'West Lake',
                    },
                  ],
                },
              ],
            },
            {
              value: 'jiangsu',
              label: 'Jiangsu',
              children: [
                {
                  value: 'nanjing',
                  label: 'Nanjing',
                  children: [
                    {
                      value: 'zhonghuamen',
                      label: 'Zhong Hua Men',
                    },
                  ],
                },
              ],
            },
          ];
        return (
            <div>
                <Cascader options={options} onChange={onChange} placeholder="Please select" />
            </div>
        )
    }
}